const Router = require("koa-router")
const router = new Router({prefix: '/sys/user'})
const {checkOwner} = require('@/controller/common/baseController')
const { getList, getById, save, update, remove, getFollowing, checkUserExist, follow, unfollow, getFollower } = require('@/controller/sys/userController')

router.get('/list', getList)
router.get('/getById/:id', getById)
router.post('/save', save)
router.post('/update', update)
router.get('/remove', checkOwner, remove)
router.get('/:id/following', getFollowing)
router.put('/follow/:id', checkUserExist, follow)
router.delete('/unfollow/:id', checkUserExist, unfollow)
router.get('/:id/getFollower', getFollower)



module.exports = router
